Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

Q is empty.

The TRS is overlay and locally confluent. By [19] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)


Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF2(true, x) → HEAD(x)
IF2(false, x) → SUM(x, cons(0, tail(tail(x))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → EMPTY(tail(x))
WEIGHT(x) → EMPTY(x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)
SUM(cons(0, x), y) → SUM(x, y)
WEIGHT(x) → TAIL(x)
IF2(false, x) → TAIL(x)
IF2(false, x) → TAIL(tail(x))
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF2(true, x) → HEAD(x)
IF2(false, x) → SUM(x, cons(0, tail(tail(x))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → EMPTY(tail(x))
WEIGHT(x) → EMPTY(x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)
SUM(cons(0, x), y) → SUM(x, y)
WEIGHT(x) → TAIL(x)
IF2(false, x) → TAIL(x)
IF2(false, x) → TAIL(tail(x))
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs with 7 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SUM(cons(0, x), y) → SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SUM(cons(0, x), y) → SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

R is empty.
The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SUM(cons(0, x), y) → SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

SUM(cons(0, x), y) → SUM(x, y)
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(SUM(x1, x2)) = x1 + 2·x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(s(x1)) = x1   



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ RuleRemovalProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

SUM(cons(s(n), x), cons(m, y)) → SUM(cons(n, x), cons(s(m), y))


Used ordering: POLO with Polynomial interpretation [25]:

POL(SUM(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(s(x1)) = 2 + x1   



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ RuleRemovalProof
QDP
                                ↳ PisEmptyProof
              ↳ QDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)

The TRS R consists of the following rules:

sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) → sum(x, y)
sum(nil, y) → y
empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
head(cons(n, x)) → n
weight(x) → if(empty(x), empty(tail(x)), x)
if(true, b, x) → weight_undefined_error
if(false, b, x) → if2(b, x)
if2(true, x) → head(x)
if2(false, x) → weight(sum(x, cons(0, tail(tail(x)))))

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

head(cons(x0, x1))
weight(x0)
if(true, x0, x1)
if(false, x0, x1)
if2(true, x0)
if2(false, x0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(x) → IF(empty(x), empty(tail(x)), x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule WEIGHT(x) → IF(empty(x), empty(tail(x)), x) at position [0] we obtained the following new rules:

WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1))
WEIGHT(nil) → IF(true, empty(tail(nil)), nil)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1))
WEIGHT(nil) → IF(true, empty(tail(nil)), nil)
IF(false, b, x) → IF2(b, x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1))
IF(false, b, x) → IF2(b, x)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule WEIGHT(cons(x0, x1)) → IF(false, empty(tail(cons(x0, x1))), cons(x0, x1)) at position [1,0] we obtained the following new rules:

WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
QDP
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x)))))
IF(false, b, x) → IF2(b, x)
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule IF2(false, x) → WEIGHT(sum(x, cons(0, tail(tail(x))))) at position [0] we obtained the following new rules:

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF2(false, nil) → WEIGHT(sum(nil, cons(0, tail(nil))))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF(false, b, x) → IF2(b, x)
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, nil) → WEIGHT(sum(nil, cons(0, tail(nil))))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(false, nil) → WEIGHT(sum(nil, cons(0, tail(nil)))) at position [0] we obtained the following new rules:

IF2(false, nil) → WEIGHT(cons(0, tail(nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
QDP
                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF2(false, nil) → WEIGHT(cons(0, tail(nil)))
IF(false, b, x) → IF2(b, x)
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(false, nil) → WEIGHT(cons(0, tail(nil))) at position [0,1] we obtained the following new rules:

IF2(false, nil) → WEIGHT(cons(0, nil))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
QDP
                                                ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

IF(false, b, x) → IF2(b, x)
IF2(false, nil) → WEIGHT(cons(0, nil))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF(false, b, x) → IF2(b, x) we obtained the following new rules:

IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
QDP
                                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF2(false, nil) → WEIGHT(cons(0, nil))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
QDP
                                                        ↳ ForwardInstantiation

Q DP problem:
The TRS P consists of the following rules:

WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By forward instantiating [14] the rule IF(false, y_0, cons(z0, z1)) → IF2(y_0, cons(z0, z1)) we obtained the following new rules:

IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
QDP
                                                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule WEIGHT(cons(x0, x1)) → IF(false, empty(x1), cons(x0, x1)) at position [1] we obtained the following new rules:

WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
WEIGHT(cons(y0, nil)) → IF(false, true, cons(y0, nil))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
QDP
                                                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(y0, nil)) → IF(false, true, cons(y0, nil))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
QDP
                                                                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(n, x)) → false
tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
QDP
                                                                        ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

The TRS R consists of the following rules:

tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
empty(nil)
empty(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

empty(nil)
empty(cons(x0, x1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
QDP
                                                                            ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2))

The TRS R consists of the following rules:

tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF(false, false, cons(x1, x2)) → IF2(false, cons(x1, x2)) we obtained the following new rules:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
QDP
                                                                                ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1))))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF2(false, cons(x0, x1)) → WEIGHT(sum(cons(x0, x1), cons(0, tail(x1)))) we obtained the following new rules:

IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, tail(cons(z1, z2)))))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
                                                                              ↳ QDP
                                                                                ↳ Instantiation
QDP
                                                                                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, tail(cons(z1, z2)))))

The TRS R consists of the following rules:

tail(nil) → nil
tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
                                                                              ↳ QDP
                                                                                ↳ Instantiation
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
QDP
                                                                                        ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, tail(cons(z1, z2)))))

The TRS R consists of the following rules:

tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, tail(cons(z1, z2))))) at position [0,1,1] we obtained the following new rules:

IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, z2)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
                                                                              ↳ QDP
                                                                                ↳ Instantiation
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ Rewriting
QDP
                                                                                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, z2)))
IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

tail(cons(n, x)) → x
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
                                                                              ↳ QDP
                                                                                ↳ Instantiation
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ Rewriting
                                                                                          ↳ QDP
                                                                                            ↳ UsableRulesProof
QDP
                                                                                                ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, z2)))
IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)
tail(nil)
tail(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

tail(nil)
tail(cons(x0, x1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
                                                                              ↳ QDP
                                                                                ↳ Instantiation
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ Rewriting
                                                                                          ↳ QDP
                                                                                            ↳ UsableRulesProof
                                                                                              ↳ QDP
                                                                                                ↳ QReductionProof
QDP
                                                                                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF2(false, cons(z0, cons(z1, z2))) → WEIGHT(sum(cons(z0, cons(z1, z2)), cons(0, z2)))
The remaining pairs can at least be oriented weakly.

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(IF(x1, x2, x3)) = x3   
POL(IF2(x1, x2)) = x2   
POL(WEIGHT(x1)) = x1   
POL(cons(x1, x2)) = 1 + x2   
POL(false) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(sum(x1, x2)) = x2   

The following usable rules [17] were oriented:

sum(nil, y) → y
sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ Rewriting
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Instantiation
                                                  ↳ QDP
                                                    ↳ DependencyGraphProof
                                                      ↳ QDP
                                                        ↳ ForwardInstantiation
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ DependencyGraphProof
                                                                  ↳ QDP
                                                                    ↳ UsableRulesProof
                                                                      ↳ QDP
                                                                        ↳ QReductionProof
                                                                          ↳ QDP
                                                                            ↳ Instantiation
                                                                              ↳ QDP
                                                                                ↳ Instantiation
                                                                                  ↳ QDP
                                                                                    ↳ UsableRulesProof
                                                                                      ↳ QDP
                                                                                        ↳ Rewriting
                                                                                          ↳ QDP
                                                                                            ↳ UsableRulesProof
                                                                                              ↳ QDP
                                                                                                ↳ QReductionProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QDPOrderProof
QDP
                                                                                                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, false, cons(z0, cons(z1, z2))) → IF2(false, cons(z0, cons(z1, z2)))
WEIGHT(cons(y0, cons(x0, x1))) → IF(false, false, cons(y0, cons(x0, x1)))

The TRS R consists of the following rules:

sum(cons(0, x), y) → sum(x, y)
sum(cons(s(n), x), cons(m, y)) → sum(cons(n, x), cons(s(m), y))
sum(nil, y) → y

The set Q consists of the following terms:

sum(cons(s(x0), x1), cons(x2, x3))
sum(cons(0, x0), x1)
sum(nil, x0)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.